package view_X_O;

import java.util.Random;

/**
 * Created with IntelliJ IDEA.
 * User: Stanislav
 * Date: 09.07.14
 * Time: 22:12
 * To change this template use File | Settings | File Templates.
 */
public class RandomCub {
    private int value;

    public int getValue() {
        return value;
    }

    private String path;

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public int randomCubes() {
        int cubTMP;
        Random generator = new Random();
        do {
            cubTMP = generator.nextInt(7);
        } while (cubTMP == 0);


        return cubTMP;

    }

    public String randPath() {

        switch (randomCubes()) {
            case 1:
                value = 1;
                setPath("D:\\JAVA_PSI\\JAVA_project\\hbntPlayer\\x_o\\src\\main\\resources\\img\\1.png");
                break;
            case 2:
                value = 2;
                setPath("D:\\JAVA_PSI\\JAVA_project\\hbntPlayer\\x_o\\src\\main\\resources\\img\\2.png");
                break;
            case 3:
                value = 3;
                setPath("D:\\JAVA_PSI\\JAVA_project\\hbntPlayer\\x_o\\src\\main\\resources\\img\\3.png");
                break;
            case 4:
                value = 4;
                setPath("D:\\JAVA_PSI\\JAVA_project\\hbntPlayer\\x_o\\src\\main\\resources\\img\\4.png");
                break;
            case 5:
                value = 5;
                setPath("D:\\JAVA_PSI\\JAVA_project\\hbntPlayer\\x_o\\src\\main\\resources\\img\\5.png");
                break;
            case 6:
                value = 6;
                setPath("D:\\JAVA_PSI\\JAVA_project\\hbntPlayer\\x_o\\src\\main\\resources\\img\\6.png");
                break;
        }
        return getPath();
    }

}
